package mx.com.zl0.scheduler.iterator;

import java.util.Calendar;
import java.util.Date;

public class DailyIterator extends ScheduleIterator {

	public DailyIterator(int hourOfDay, int minute, int second) {
		calendar.set(Calendar.HOUR_OF_DAY, hourOfDay);
		calendar.set(Calendar.MINUTE, minute);
		calendar.set(Calendar.SECOND, second);
		calendar.set(Calendar.MILLISECOND, 0);
	}

	@Override public Date next() {
		calendar.add(Calendar.DATE, 1);
		return calendar.getTime();
	}
}